package com.indexingsystem.boss.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.indexingsystem.boss.entity.UserInstitution;

public interface UserInstitutionMapper {
	int deleteUserInstitutionByIdBatch(@Param("list") List<String> list);

	int deleteByPrimaryKey(String userInstitutionId);

	int insert(UserInstitution record);

	int insertSelective(UserInstitution record);

	List<UserInstitution> selectUserInstitutionList();

	UserInstitution selectByPrimaryKey(String userInstitutionId);

	int updateByPrimaryKeySelective(UserInstitution record);

	int updateByPrimaryKey(UserInstitution record);
	
	
	/**
	 * 通过机构id获取机构所有用户关系离线数据包.
	 * @param institutionId
	 * @return
	 */
	List<UserInstitution> getUserInstitutionsListByInstitutionId(String institutionId);

	/**
	 * 通过userId删除用户机构关系信息.
	 * 
	 * @param userId
	 * @return
	 */
	int deleteUserInstitutionByUserId(String userId);

	/**
	 * 通过userId查询用户机构关系.
	 * 
	 * @param userId
	 * @return
	 */
	UserInstitution selectUserInstitutionByUserId(String userId);

	/**
	 * 删除用户批量删除用户机构关系表.
	 * 
	 * @param list
	 * @return
	 */
	int deleteBatchUserInstitution(@Param("list") List<String> list);
}